package com.hjw.junit;

import com.hjw.oop.ParkUtils;
import com.hjw.oop.Jourist;

import java.util.Arrays;
import java.util.UUID;

/**
 * 该类主要用于测试使用Tourist
 * @author hjwStrart
 * @create 2022-01-07 10:24
 */
public class TestJourist {
    public static void main(String[] args) {
        Jourist[] jourists = new Jourist[5];
        for (int i = 0; i < jourists.length; i++) {
            jourists[i] = new Jourist();
            jourists[i].setName((i + 1) + "号游客") ;
            jourists[i].setAge((int)(Math.random() * 85 + 6));
            jourists[i].setGender(jourists[i].getAge() % 2 == 0 ? "男" : "女");
            jourists[i].setIdentify(UUID.randomUUID().toString().substring(0,19));
            jourists[i].setLocation("中国");
        }
        System.out.println(Arrays.toString(jourists));
        ParkUtils parkUtils = new ParkUtils();
        for (Jourist jourist : jourists) {
            parkUtils.calculatePrice(jourist);
        }
    }
}
